<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mesog/ogsends/Ogsend.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mesog/ogsends/Ogsend.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Sdid',
                footer: "Foots",
                cnName: '外协发货',
                name: 'ogsends/Ogsend',
                url: "/Ogsend/",
                sortName: "Sdid"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"outsourcing_number":"","product_name":"","operator":"","operation_date":[null,null]});
            const searchFormOptions = ref([[{"title":"外协编号","field":"outsourcing_number"},{"title":"品名","field":"product_name"},{"title":"操作人","field":"operator"},{"title":"日期","field":"operation_date","type":"range"}]]);
            const columns = ref([{field:'outsourcing_number',title:'外协编号',type:'string',width:220,align:'left',sort:true},
                       {field:'outsourcing_unit',title:'外协单位',type:'string',width:220,align:'left'},
                       {field:'barcode',title:'条码',type:'string',width:220,align:'left'},
                       {field:'product_name',title:'品名',type:'string',width:220,align:'left'},
                       {field:'outsourcing_process',title:'外协工序',type:'string',width:220,align:'left'},
                       {field:'total_quantity',title:'总数量',type:'int',width:110,align:'left'},
                       {field:'current_shipment_quantity',title:'本次发货数',type:'int',width:110,align:'left'},
                       {field:'operator',title:'操作人',type:'string',width:220,align:'left'},
                       {field:'operation_date',title:'日期',type:'datetime',width:150,require:true,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
